from django.test import TestCase
from project import models

class SetupProjectDataMixin(TestCase):
    @classmethod
    def setUpTestData(cls):
        cls.p0 = models.Project.objects.create(
            chinese_name="项目-0",
            english_name="project-0"
        )
        cls.p0_plan0 = models.Plan.objects.create(project = cls.p0)
        cls.p0_plan1 = models.Plan.objects.create(project = cls.p0)
        cls.p0_initiation0 = models.InitiationData.objects.create(project = cls.p0, version=0)
        cls.p0_initiation1 = models.InitiationData.objects.create(project = cls.p0, version=1)
        cls.p0_ethical_review0 = models.EthicalReview.objects.create(project = cls.p0)
        cls.p0_ethical_review1 = models.EthicalReview.objects.create(project = cls.p0)
        # NOTE there are models under human genetic ersource haven't been created
        cls.p0_human_genetic_resource = models.EthicalReview.objects.create(project = cls.p0)
        cls.p0_contract0 = models.Contract.objects.create(project = cls.p0, contract_amount=100)
        cls.p0_contract1 = models.Contract.objects.create(project = cls.p0, contract_amount=100)
        cls.p0_before_implement = models.BeforeImplement.objects.create(project = cls.p0)
        cls.p0_material0 = models.Material.objects.create(project = cls.p0)
        cls.p0_beginning = models.Beginning.objects.create(project = cls.p0)
        cls.p0_implement = models.Implement.objects.create(project = cls.p0)
        cls.p0_quality_control0 = models.QualityControl.objects.create(project = cls.p0)
        cls.p0_quality_control1 = models.QualityControl.objects.create(project = cls.p0)
        cls.p0_finish = models.Finish.objects.create(project = cls.p0)
        cls.p0_examination0 = models.Examination.objects.create(project = cls.p0)

        
